<template>
  <div id="tradeOrderPosition">
    <div class="fixed">
      <NavBar title="极速持仓" />
      <tabs class="tabBox" v-model="active">
        <tab :title="item" v-for="item in tabItem" :key="item" :text="item" />
      </tabs>
    </div>
    <div class="list">
      <div class="item" v-for="item in 10" :key="item">
        <div class="time">卖出时间：2021-07-28 15:56:12</div>
        <div class="title">BTC/USDT</div>
        <div class="home-CzBox">
          <div class="home-CzBox-fl">
            <div class="dd-NN-title">
              <div class="btn-Market-red">
                买空
              </div>
              <div class="dd-pos-title-fl">
                20.00<span style="font-size: 8px;">USDT</span>
              </div>
            </div>
            <div class="dd-NN-title">
              <div class="home-cfi_p">买入价:39842.53</div>
              <div class="home-cfi_p">
                卖出价:39847.31
              </div>
            </div>
            <div class="dd-NN-title">
              <div class="home-cfi_p">订单时长:10秒</div>
            </div>
          </div>
          <div class="home-CzBox-fr">
            合约盈亏
            <div class="red">-4</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import NavBar from '@/components/navbar'
import { Tab, Tabs } from 'vant'
export default {
  components: {
    NavBar,
    Tab,
    Tabs
  },
  data() {
    return {
      tabItem: ['在持', '历史'],
      active: 0 //tab数值
    }
  }
}
</script>

<style lang="less" scoped>
#tradeOrderPosition {
  background: #f7f6fb;
  min-height: 100vh;
  padding-top: 87px;
  .fixed {
    width: 100%;
    position: fixed;
    top: 0;
    .tabBox {
      /deep/.van-tabs__wrap {
        margin: 10px 0;
      }
      /deep/.van-tab--active {
        font-size: 15px;
        color: rgb(41, 121, 255);
        font-weight: bold;
      }
      /deep/.van-tabs__line {
        width: 30px;
        background-color: rgb(41, 121, 255);
        height: 3px;
        border-radius: 3px;
      }
      /deep/.van-tabs__wrap {
        margin: 0;
      }
    }
  }
  .list {
    padding: 10px;
    .item {
      margin: 10px 0;
      background: #fff;
      padding: 0 10px;
      border-radius: 10px;
      margin-bottom: 10px;
      .time {
        line-height: 50px;
        text-align: center;
        color: #588bf7;
        font-size: 16px;
        font-weight: bold;
      }
      .title {
        color: #000;
        font-size: 18px;
        font-weight: 600;
      }
      .red{
        color: #cd4e65 !important;
      }
      .green{
        color: #1cad90 !important;
      }
      .home-CzBox {
        margin-top: 5px;
        background: #f8f8fb;
        padding: 0 1px;
        display: flex;
        color: #213e58;
        font-weight: 700;
        .home-CzBox-fl {
          width: 75%;
          height: 100px;
          overflow: hidden;
          background-color: #fff;
          padding: 1px;
          margin: 1px 0 1px 1px;
          .dd-NN-title {
            margin-right: 25%;
            display: flex;
            justify-content: space-between;
            margin-bottom: 1px;
            align-items: center;
            line-height: 30px;
            .btn-Market-red {
              background: #cd4e65;
              width: 60px;
              line-height: 28px;
              padding: 0 5px;
              color: #fff;
              border-radius: 500px;
              text-align: center;
            }
            .dd-pos-title-fl {
              color: #000;
              font-size: 18px;
              font-weight: 600;
            }
          }
        }
        .home-CzBox-fr {
          display: flex;
          flex-direction: column;
          align-items: center;
          justify-content: center;
          width: 24%;
          height: 100px;
          overflow: hidden;
          background-color: #fff;
          padding: 1px;
          margin: 1px 0 1px 1px;
          div{
            margin-top: 5px;
          }
        }
      }
    }
  }
}
</style>
